package com.esisa.dao.hibernate;

import com.esisa.dao.CreteresVaccinantionDao;
import com.esisa.models.CreteresVaccinantion;


public class CreteresVaccinantionDaoHibernate extends AbstractHibernateDao implements CreteresVaccinantionDao {

	@Override
	public boolean insert(CreteresVaccinantion creteresVaccinantion) {
		beginTransaction();
			session.save(creteresVaccinantion);
		commit();
		return true;
	}

	@Override
	public CreteresVaccinantion select(Long id) {
		CreteresVaccinantion creteresVaccinantion=null;
		beginTransaction();
			creteresVaccinantion=(CreteresVaccinantion)session.get(CreteresVaccinantion.class,id);
		commit();
		return creteresVaccinantion;
	}

	@Override
	public void delete(CreteresVaccinantion creteresVaccinantion) {
		beginTransaction();
			session.delete(creteresVaccinantion);
		commit();
	}

	@Override
	public void update(CreteresVaccinantion creteresVaccinantion) {
		beginTransaction();
			session.update(creteresVaccinantion);
		commit();
	}

}
